<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>客户列表</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<script type="text/javascript">
    var grid = null;
    var cstRlFlag = '${cstRlFlag}';
    $(function () {
        initGrid();//注意初始化要在initForm之后,因为在初始化grid的时候需要form参数
    });

    //初始化列表
    function initGrid(){
        var params = {};
        $("#ligergrid1").ligerGrid({
            url: '<%=path%>/project/calquatprps/initList.do',
            method : 'get',
            parms:params,
            columns: [
                { display: '方案名称', name: 'prpsCfgNm', minWidth: 140
                },
                { display: '合同额', name: 'contAmt', minWidth: 140,render:renderAmt,enabledSort:true},
                { display: '租赁期数', name: 'lsPd', minWidth: 60 , enabledSort:true},
                { display: '支付方式', name: 'payWayCdNm', minWidth: 100 },
                { display: '方案类型', name: 'prpsTypCdNm', minWidth: 100 },
                { display: '实际收益率(%)', name: 'irrPct', minWidth: 100},
                { display: '实际收益率2(%)', name: 'irrPct2', minWidth: 100},
                { display: '产品分类', name: 'prdTypCdNm', minWidth: 100},
                { display: '产品收益率(%)', name: 'prdIrrPct', minWidth: 100},

                { display: '创建时间', name: 'crtTm', minWidth: 60, render:renderDate},
                {
                    display: '操作',
                    isSort: false,
                    width: 100,
                    render: function (rowdata, rowindex, value) {
                        var h = '<a class="sq-button-hasicon" href="javascript:chooseMfrRow(';
                        h += "'" + rowdata.id + "'";
                        h += ')"><i class="sqBtnIco_3"></i>选择</a>'
                        return h;
                    }
                }
            ],
            pageSize:100,
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-2,
            checkbox:true,
            allowUnSelectRow: true,
            alternatingRow: true,
            rownumbers:true,
            enabledEdit: true,
            usePagerOnLessPagesize: true
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(300);
    }

    //格式化为人民币格式
    function renderAmt(rowdata, rowindex, value) {
        var h="￥" + FormatMoney(value)
        return h;
    }
    //格式化时间
    function renderDate(rowdata, index, value){
        var dateStr = "";
        if(null != value&&value!=''){
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
        }
        return dateStr;
    }



    function iframeResize() {
        if (parent.mainApp) {
            parent.mainApp.parentTab.onResize();
        }
        ;
    }
    function chooseMfrRow(id) {
        var isSuppSplMfr = $("#isSuppSplMfr").val();
        parent.window.document.getElementById("calQuatPrpsId").value = id;
        parent.window.document.getElementById("isSuppSplMfr").value = isSuppSplMfr;
        parent.$.ligerDialog.close();
        parent.$(".l-dialog,.l-window-mask").css("display", "none");
    }
</script>

<body class="iframeBody">

<div class="Wrapper">
    <div id="pageInTab" class="pageInTab">
        <form id="formSet1">
            <div class="fieldset1 tabel_col clearFix">
                <div class="fieldBox col_33">
                    <div class="label">支持厂商贴息类型</div>
                    <div class="field">
                        <select name="isSuppSplMfr" id="isSuppSplMfr" data-value=" ">
                           <%-- <option value="  " selected="selected">--请选择--</option>--%>
                            <option value="1" selected="selected" >贴头</option>
                        <%--    <option value="0">旧厂商方案 </option>--%>
                        </select>
                        <span class="requiredSymbol">*</span>
                    </div>
                </div>

            </div>
        </form>

    </div>
</div>
<div id="ligergrid1" class="sq-grid"></div>
</div>
</body>
</html>